require 'erb'
# Methods added to this helper will be available to all templates in the application.
module ApplicationHelper

 def escape_javascript(javascript)
        javascript.gsub!("\r\n", "\\n")

end


  def generate_timeline_javascript(memorylane)

   # if timeline_plugin_register.nil timeline_plugin_register,memorylane
    

      template = ERB.new(memorylane.timeline_js)
     timeline_js_raw =template.result(binding)
    # escape_javascript(timeline_js_raw)
    #  timeline_js_mod = helper.escape_javascript(timeline_js_raw)
 
     
    #  @url= helper.url_for(:action => 'load_mlevents.json',:controller => 'memorylanes')

  #  else

 #   end



  end

end

